package com.itheima.mapper;


import com.itheima.domain.Patient;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper {

    @Insert("insert into patient(name,gender,did) values(#{name},#{gender},#{did})")
    void addOne(Patient patient);

    @Select("select id from office where name = #{office}")
    int findOneByOffice(String office);

    @Select("select gender from patient ")
    List<Integer> selectGender();

    @Select("select name from office")
    List<String> selectOfficeName();

    @Select("select * from patient")
    List<Patient> selectAll();

    @Select("select name from office where id =#{id}")
    String selectOne(int did);
}
